home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act3 / 00279_Routines.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  2.5 KB  |  82 lines

  1. on startMovie
  2.   global digitalis, game3level, WhichBug, TxtCursor, TRIAL, isaid, imdone, singit
  3.   set imdone to 0
  4.   set TRIAL to 1
  5.   set WhichBug to 1
  6.   set isaid to 1
  7.   set TRIAL to 1
  8.   set WhichBug to 1
  9.   if value(game3level) = 0 then
  10.     set game3level to 1
  11.   end if
  12.   set digitalis to []
  13.   set ref to the number of cast "digit0"
  14.   repeat with xxx = 0 to 40
  15.     add(digitalis, ref + xxx)
  16.   end repeat
  17.   set singit to 0
  18. end
  19.  
  20. on RotateCursor
  21.   global TxtCursor, cursorcycle, digitalis, cursortime, highlow, changer
  22.   if the timer > cursortime then
  23.     set cursortime to the timer + 15
  24.     set highlow to 1 - highlow
  25.     set rent to value(changer)
  26.     if rent = 0 then
  27.       set the castNum of sprite TxtCursor to getAt(digitalis, 16 + highlow)
  28.     else
  29.       set the castNum of sprite TxtCursor to getAt(digitalis, 1 + (highlow * 28) + rent)
  30.     end if
  31.   end if
  32. end
  33.  
  34. on notright
  35.   global TRIAL, WhichBug, TxtCursor, bugnumber
  36.   set onesdigit to 42 + WhichBug
  37.   set TxtCursor to onesdigit
  38.   set the castNum of sprite onesdigit to the number of cast "FirstCursor"
  39.   updateStage()
  40.   set the visible of sprite onesdigit to 1
  41.   if TRIAL = 1 then
  42.     play frame "try again"
  43.     set TRIAL to TRIAL + 1
  44.   else
  45.     if TRIAL = 2 then
  46.       set bottombug to WhichBug + 3
  47.       set bugname to the name of cast the castNum of sprite bottombug
  48.       set bugnumber to value(chars(bugname, 4, length(bugname)))
  49.       set flashme to bugnumber + 9
  50.       set oldink to the ink of sprite flashme
  51.       repeat with xxx = 1 to 10
  52.         set the ink of sprite flashme to 4
  53.         updateStage()
  54.         repeat with yyy = 1 to 100
  55.         end repeat
  56.         set the ink of sprite flashme to 5
  57.         updateStage()
  58.         repeat with yyy = 1 to 100
  59.         end repeat
  60.       end repeat
  61.       set the ink of sprite flashme to oldink
  62.       set TRIAL to TRIAL + 1
  63.     else
  64.       if TRIAL = 3 then
  65.         set correctstr to EMPTY & getAt(bugnumber, WhichBug)
  66.         set holdchar1 to char 1 of correctstr
  67.         set holdchar2 to char 2 of correctstr
  68.         set the castNum of sprite onesdigit to the number of cast ("digit" & holdchar1)
  69.         if holdchar2 = EMPTY then
  70.           set the visible of sprite onesdigit to 0
  71.           set the castNum of sprite onesdigit to the number of cast "tens"
  72.         else
  73.           set the castNum of sprite onesdigit to the number of cast ("digit" & holdchar2)
  74.           set the visible of sprite onesdigit to 1
  75.         end if
  76.         set TxtCursor to 0
  77.         updateStage()
  78.       end if
  79.     end if
  80.   end if
  81. end
  82.